package com.boot.activemq.provide.service.impl;


import javax.jms.Destination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Service;

@Service("activemqProvide")
public class ActivemqProvide {

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;


    public void sendMessage(Destination destination, final String message){
        jmsMessagingTemplate.convertAndSend(destination,message);
    }

}
